# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test03
# Description:  例23.3
# Author:       ASUS
# Date:         2019/4/4
#-------------------------------------------------------------------------------


from numpy import *
a = array([[1,2,3],[4,5,6],[7,8,9]])
#获取数组值
print(a[0,0])
print("a[0,1] = {}, a[2,1] = {}".format(a[0,1],a[2,1]))

#分片操作,半闭合
print(a[0:1])
print(a[0:1][0])
print(a[0:2])
b = a[0:]
print(b)
print(a[0::2])
print(a[-3:-1])


